package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.mapper.BlogMapper;
import com.bwie.pojo.Blog;
import com.bwie.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 国兴越
 * @version 1.0
 * Create by
 */
@Service
public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements BlogService {

    @Autowired
    BlogMapper blogMapper;


    @Override
    public Page<Blog> lists(int pageNum, int pageSize) {


        Page<Blog> list =new Page<>(pageNum,pageSize);


        return blogMapper.lists(list);
    }

    @Override
    public List<Blog> select(String name) {
        return blogMapper.select(name);
    }
}
